(a) Why do I use hash functions to encrypt passwords
If you need to save a password (such as a website user's password), you should consider how to protect the password data, and it is extremely unsafe to write the password directly to the database
We know that if the password is hashed directly, then the hacker can get a hash value by obtaining this password, and then by checking the hash value dictionary (for example, MD5 password cracking site), the password of a user.Adding salt can solve
Transferred from: http://blog.csdn.net/blade2001/article/details/6341078We know that if the password is hashed directly, then the hacker can get a hash value by obtaining this password, and then by checking the hash value dictionary (for example, MD5
Detailed explanation of how to execute hash and salt operations on passwords
The hash and salt operations on passwords are not unfamiliar. The two Visual Studio Enterprise Edition examples use this method to encrypt this
1 backgroundThe system involved in authentication needs to store the user's authentication information, the commonly used user authentication method mainly is the user name and the password way, in order to be safe, the user input password needs to
The hash and Salt operations on passwords are not unfamiliar. The two Visual Studio Enterprise Edition examples use this method to encrypt this method. Combined with the sample code, I summarized a class that includes static methods such as
How to add salt?
In order to enhance the safety of MD5, in addition to the new algorithm to add a part of the value of salt, salt value is a randomly generated set of strings, can include random uppercase and lowercase letters, numbers, characters,
We know that if you hash the password directly, the hacker can get a user's password by getting the password hash value, and then by checking the hash value dictionary (such as MD5 password to crack the website).Adding salt can solve this problem to
Transfer from http://www.smatrix.org/bbs/simple/index.php?t5591.html//////////////////////////////////////////////////////////////////////////////Directory1. PHP hash function and its application2. Symmetric cipher algorithm in PHP and its
A simple md5 and salt encryption method (to prevent rainbow tables from hitting the database)
Md5 encryption (or digest algorithm) is not explained if you are familiar with it.
Currently, many database designs prefer to use one-way encryption to
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.